<template name="ionPopup">
  <div class="backdrop">
    <div class="popup-container">
      <div class="popup">
        {{#if hasHead}}
          <div class="popup-head">
            {{#if title}}
              <h3 class="popup-title">{{title}}</h3>
            {{/if}}
            {{#if subTitle}}
              <h5 class="popup-sub-title">{{subTitle}}</h5>
            {{/if}}
          </div>
        {{/if}}
        {{#if template}}
          <div class="popup-body">
            {{{template}}}
          </div>
        {{/if}}
        {{#if buttons.length}}
          <div class="popup-buttons">
            {{#each buttons}}
              <button data-action="buttonTapped" data-index="{{index}}"
              class="button {{type}}">
                {{{text}}}
              </button>
            {{/each}}
          </div>
        {{/if}}
      </div>
    </div>
  </div>

</template>
